# include <iostream>

using namespace std;

int charge( int m);

int main() 
{
    double m,p,n;
    int  a, b, c,a1,b1,c1,n1;
    cout<<"enter the money and the price"<<endl;
    cin>>m>>p;
    n=m-p;
    cout<<"the charge is"<<n<<endl;

    a=n/10;
    a1=charge(a);
    cout<<a1<<endl;

    b=n-a*10;
    b1=charge(b);
    cout<<b1<<endl;

    c=(n*10-a*100-b*10);
    c1=charge(c);
    cout<<c1<<endl;

    n1=a1+b1+c1;

    cout<<"the total page of charge is"<<n1<<endl;

    cin>>n;
    return 0;
}

int charge(int m)
{
   int n5=0, n2=0, n1=0, n=0;
    
   if (m>=5) 
       {
            n5=1;
            m=m-5;
        }

   else if(m>1)
        {

            while(m>1)
            { m=m-2;
              n2=n2+1;
            }
            if (m==1) n1=1;
         }
        else  if(m==1)  n1=1;             
       
 
    n=n5+n2+n1;
    return n;

}




    